import os
import sys

# 请在此输入您的代码

n, m, k = map(int, input().split())

ans = 0
# 5 1 2
a=[]

def f(sum):
    if sum == n:

        global ans
        ans += 1
        print(*a)
        return
    for i in range(m, k + 1):
        sum += i
        if sum <= n:
            a.append(i)
            # print(sum)
            f(sum)
            a.pop()
        # 回溯
        sum -= i

f(0)
print(ans)
